package com.wjj.demo;

import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import com.wjj.demo.view.ZoomableDraweeView;

/**
 * Created by Wjj on 16/11/15.
 */
public class ImageZoomActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_imagezoom);

        ZoomableDraweeView zoomableDraweeView = (ZoomableDraweeView) findViewById(R.id.my_image_view);
        zoomableDraweeView.setAspectRatio(0.8F);
        zoomableDraweeView.setImageURI(Uri.parse("http://f2.dn.anqu.com/down/YjFkMw==/allimg/1301/60-130130114620.jpg"));

        zoomableDraweeView.setOnClickListener(new ZoomableDraweeView.OnClickListener() {
            @Override
            public void onClick() {
                finish();
            }
        });

    }
}
